<template>
    <div>
        <el-row :gutter="20">
            <el-col :span="4"><div class="grid-content"></div></el-col>
            <el-col :span="16">
                <div>
                    <h2>Table View</h2>
                </div>
                <el-table
                        :data="tableData"
                        style="width: 100%">
                    <el-table-column
                            prop="province"
                            label="地区"
                            width="180">
                    </el-table-column>
                    <el-table-column
                            prop="confirm"
                            label="累计确诊"
                            width="180">
                    </el-table-column>
                    <el-table-column
                            prop="dead"
                            label="死亡"
                            width="180">
                    </el-table-column>
                    <el-table-column
                            prop="heal"
                            label="治愈">
                    </el-table-column>
                    <el-table-column
                            prop="confirm_add"
                            label="新增确诊">
                    </el-table-column>
                    <el-table-column label="操作">
                        <template slot-scope="scope">
                            <el-button
                                    size="mini"
                                    type="danger"
                                    @click="handleDelete(scope.$index, scope.row)">详情</el-button>
                        </template>
                    </el-table-column>
                </el-table>
            </el-col>
            <el-col :span="4"><div class="grid-content"></div></el-col>
        </el-row>

    </div>
</template>

<script>
    export default {
        name: "test",
        data() {
            return {
                tableData: [],
            }
        },
        created() {
            this.axios.get("http://127.0.0.1:8088/tableData")
                .then(res =>{
                    this.tableData = res.data;
                    console.log(JSON.stringify(res.data))
                })
                .catch(err =>{
                    console.log(err)
                })
        }
    }
</script>

<style scoped>

</style>